import { v4 as uuidv4 } from "uuid"

function getTempId() {
  let userId = localStorage.getItem("userId")

  if (!userId) {
    userId = uuidv4()
    localStorage.setItem("userId", userId)
  }

  return userId
}

export default getTempId
